//
//  AnswerResultView.m
//  JW_BasePorject
//
//  Created by JW on 2018/7/6.
//  Copyright © 2018年 JW. All rights reserved.
//

#import "AnswerResultView.h"

@interface AnswerResultView ()

@property (nonatomic,strong)UILabel *timeLabel;

@property (nonatomic,strong)UILabel *rateLabel;

@property (nonatomic,strong)UILabel *errorLabel;

@end

@implementation AnswerResultView


- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        
        [self initConfigureView];
    }
    return self;
}

- (void)initConfigureView{
    [self addSubview:self.timeLabel];
    [self addSubview:self.rateLabel];
    [self addSubview:self.errorLabel];
    
    
    
}

- (void)updateLabel:(UILabel *)label text:(NSString *)text{
    
    
}


-(UILabel *)errorLabel{
    if (_errorLabel == nil) {
        _errorLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH/3*2, 0, SCREEN_WIDTH/3, 60)];
        _errorLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];
        _errorLabel.textAlignment = NSTextAlignmentCenter;
        _errorLabel.numberOfLines = 2;
        NSAttributedString *errorStr = [[NSAttributedString alloc] initWithString:@"易错项\n" attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:13],NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
        _errorLabel.attributedText = errorStr;
    }
    return  _errorLabel;
}

-(UILabel *)rateLabel{
    if (_rateLabel == nil) {
        _rateLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH/3, 0, SCREEN_WIDTH/3, 60)];
        _rateLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];
        _rateLabel.textAlignment = NSTextAlignmentCenter;
        _rateLabel.numberOfLines = 2;
        NSAttributedString *rateStr = [[NSAttributedString alloc] initWithString:@"全站正确率\n" attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:13],NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
        _rateLabel.attributedText = rateStr;

    }
    return  _rateLabel;
}

- (UILabel *)timeLabel{
    if (_timeLabel == nil) {
        _timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH/3, 60)];
        _timeLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];
        _timeLabel.textAlignment = NSTextAlignmentCenter;
        _timeLabel.numberOfLines = 2;
        NSAttributedString *timeStr = [[NSAttributedString alloc] initWithString:@"答题时间\n" attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:13],NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
        _timeLabel.attributedText = timeStr;

    }
    return  _timeLabel;
}



@end
